// 引入Service和请求头ServiceName
import { Service, ServiceName } from '@/network/http.js'

const api = {
  /**
   * 获取停时原因数据
   * @param {Object} params 检索条件的obj
   */
  reqGetStopReason(params) {
    return Service.get(
      `/${ServiceName}/api/external/btStopReason/queryall`,
      {params}
    )
  },

  /**
   * 根据id获取停时原因数据
   * @param {*} params 检索条件的obj
   */
  reqGetStopReasonById(id) {
    return Service.get(
      `/${ServiceName}/api/external/btStopReason/querybyid?id=${id}`
    )
  },

  /**
   * 新增停时原因信息
   * @param {Object} params 检索条件的obj
   */
  reqPostAddStopReason(params) {
    return Service.post(
      `/${ServiceName}/api/external/btStopReason/add`,
       params
    )
  },

  /**
   * 修改停时原因信息
   * @param {Object} params 检索条件的obj
   */
  reqPutUpdateStopReason(params) {
    return Service.put(
      `/${ServiceName}/api/external/btStopReason/updatebyid`,
       params
    )
  },

  /**
   * 删除停时原因信息
   * @param {*} params 检索条件的obj
   */
  reqDeleteStopReason(id) {
    return Service.delete(
      `/${ServiceName}/api/external/btStopReason/deletebyid?id=${id}`
    )
  },
}
export default api
